public class Test {
    public static void main(String[] args) {
        B b = new B();
        b.print();
    }
}

class A{
    int a = 5;
    int b = 10;
}
class B extends A{
    int b = 20;
    int c = 15;
    public void print(){
        System.out.println(a); //输出5
        System.out.println(b); //输出20
        System.out.println(c); //输出15
    }
}

//class Plane{
//    String type;
//    String color;
//
//    public void fly(){
//        System.out.println("飞机会飞！");
//    }
//}
//class Airliner extends Plane{
//    public void func(){
//        System.out.println("运送乘客！");
//    }
//}
//class FighterPlane extends Plane{
//    public void func(){
//        System.out.println("发射炮弹！");
//    }
//}